<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>

        *{
            padding: 0px;
            margin: 0px;
            text-align: center;
            border-radius: 10px;
        }
        #header{
            border: 1px solid #234567;
            margin: 10px;
            padding: 10px;
        }
        #main{
            /*border: 1px solid #8bc34a;*/
            /*height: 300px;*/
            margin: 0px 20px;
            display: block;
        }
        #footer{
            border: 1px solid #a78231;
            margin: 10px;
            padding: 10px;
        }
        #main>#nav{
            height: 32px;
            font-size: 0px;
            padding: 5px;
        }
        #main>div{
            border: bisque 1px solid;
            margin-bottom: 10px;
            padding: 10px;
            height: 80px;
        }
        #main>#nav>div{
            display: inline;
            border: aqua 1px solid;
            margin: 10px;
            font-size: 24px;
            line-height: 30px;
        }

    </style>

</head>
<body>

<div id="header">页头</div>
<div id="main">
    <div id="nav">
        <div>Home</div>
        <div>List</div>
        <div>About</div>
        <div>Contact</div>
    </div>
    <div>内容A区</div>
    <div>内容B区</div>
    <div>内容C区</div>
    <div>内容D区</div>
</div>
<div id="footer">页尾</div>

<!--
优先级
id优先级最高
class其次
标签最低
最后继承

inline:可以设置左右外边距，不能设置上下外边距
-->
</body>
</html>